import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Router from 'vue-router'

// eslint-disable-next-line no-unused-vars
import Mock from '@/mock'

import axios from 'axios'

Vue.config.productionTip = false

Vue.prototype.$axios = axios

Vue.use(ElementUI)

const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
    if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
    return originalPush.call(this, location).catch(err => err)
}

new Vue({
    store,
    router,
    render: h => h(App)
}).$mount('#app')